<local:DocumentBase x:Class="WPFExcelReport.UBTDWB"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                     xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:DGB="clr-namespace:WPFExcelReport;assembly=TICC_STOCK" 
                    xmlns:CHG="clr-namespace:WPFExcelReport;assembly=TICC_STOCKCHG" 
                     xmlns:WBW="clr-namespace:WPFExcelReport;assembly=TICC_WBBEW" 
                    xmlns:WBR="clr-namespace:WPFExcelReport;assembly=TICC_WBERROR" 
                    xmlns:WR="clr-namespace:WPFExcelReport;assembly=TWBFEHL" 
                    Name="TV"
                    Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:BoolToVisibilityConverter x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*" ></RowDefinition>
            <RowDefinition Height="1*" ></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <TabControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <TabItem Header="坯检"  Name="ZoneRQI">
                <DGB:TUBTRQI Name="cRQI"
                               />
            </TabItem>
            <TabItem Header="划码单"  Name="ZoneHMD">
                <DGB:TUBTRXB Name="cHMD"
                               />
            </TabItem>
            <TabItem Header="入库明细" Name="ZoneI" >
                <DGB:TFDWB  Name="cI"
                            KEY="{Binding ORDERNUM,ElementName=cChg}"
                            />
            </TabItem>

            <TabItem Header="产量" Name="ZoneProd" >
                <DGB:TSYDWB13 Name="cPROD"
                               />
            </TabItem>
            <TabItem Header="验布产量">
                <DGB:TYBWB13  
                               />
            </TabItem>
            <TabItem Header="每日A级率" Name="ZonePRODA">
                <DGB:TSYQIPRA  Name="cPRODA"
                               />
            </TabItem>
            <TabItem Header="织造车间A级率" >
                <DGB:TSYHWVPROD  Name="cWVPRODA"
                               />
            </TabItem>
            <TabItem Header="班次A级率" >
                <DGB:TSYHPRODA Name="cShift"
                               />
            </TabItem>
            <TabItem Header="挡车工扣分">
                <DGB:TSYHWVRPOINT  Name="cWver"
                               />
            </TabItem>
            <TabItem Header="车间产量">
                <DGB:TSYWVZNPROD  
                               />
            </TabItem>

        </TabControl> 
       
        <TabControl Grid.Row="2" Grid.Column="0"  Grid.ColumnSpan="2">
            <TabItem Header="{Binding Source={Localization:Translate Word=明细}}" Name="cDB"
                    >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition> 
                    </Grid.ColumnDefinitions>
                    <CHG:TFSTKCHG  Grid.Row="1" Grid.Column="0" Name="cChg"
                                   ORDERNUM="{Binding KEY,ElementName=cI}"
                                   />
                    <WBW:TCWB14  Grid.Row="1" Grid.Column="1"
                                   ORDERNUM="{Binding KEY,ElementName=cChg}"
                                   />
                </Grid> 
            </TabItem>
            <TabItem Header="{Binding Source={Localization:Translate Word=明细}}"  
                     IsSelected="{Binding IsSelected,ElementName=ZoneRQI}"
                     >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="1*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                        <ColumnDefinition Width="1*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <WBR:TWBER  Grid.Row="1" Grid.Column="0"
                                Name="cWBER"
                                   EXAUF="{Binding KEY,ElementName=cRQI}"
                                   />
                    <WR:TWB18X  Grid.Row="1" Grid.Column="1"
                                   EXAUF="{Binding ERVKEY,ElementName=cWBER}"
                                   />
                </Grid>
            </TabItem>
        </TabControl> 
    </Grid>
</local:DocumentBase>
